package com.jt;

public class NewDog {
    public static void main(String[] args) throws ClassNotFoundException, IllegalAccessException, InstantiationException {
        Dog dog =(Dog) Class.forName("com.jt.Dog").newInstance();
        dog.hello();
        Object o = Class.forName("com.jt.Dog").newInstance();
        Dog dog1=(Dog)o;
            dog1.hello();
    }
}
